ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.

  # Sample of regular route:
  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   map.resources :products

  # Sample resource route with options:
  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }

  # Sample resource route with sub-resources:
  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller

  # Sample resource route within a namespace:
  #   map.namespace :admin do |admin|
  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  #     admin.resources :products
  #   end

  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  # map.root :controller => "welcome"

  # See how all your routes lay out with "rake routes"
#HomePage
map.root :controller => "homepage"

#game routes
map.schedule '/schedule/show/:id', :controller => "schedule",
				:action => "show"
map.new_schedule '/schedule/new', :controller => "schedule",
			   :action => "new"

#practice routes
map.practice '/practice/show/:id', :controller => "practice",
				:action => "show"
map.new_practice '/practice/new', :controller => "practice",
			   :action => "new"

#team routes
map.team '/team/show/:id', :controller => "team",
				:action => "show"
map.new_team '/team/new', :controller => "team",
			   :action => "new"

#event routes
map.events '/events/show/:id', :controller => "events",
				:action => "show"
map.new_events '/events/new', :controller => "events",
			   :action => "new"

#news routes
map.news '/news/show/:id', :controller => "news",
				:action => "show"
map.new_news '/news/new', :controller => "news",
			   :action => "new"

  # user routes
  map.with_options :controller => "user" do |u|
    u.users   'user',       :action => "index"
    u.profile 'profile/:id', :action => "show"
    u.signup  'signup',      :action => "new"
    u.user    'user/:action/:id'
  end

  # session routes
  map.with_options :controller => "sessions" do |s|
    s.login   'login',  :action => "new"
    s.logout  'logout', :action => "destroy"
    s.session 'sessions/:action/:id'
  end
  # user routes
  map.with_options :controller => "manager" do |m|
    m.managers   'manager',       :action => "index"
    m.profile 'profile/:id', :action => "show"
    m.signup  'signup',      :action => "new"
    m.manager    'manager/:action/:id'
  end				
  # Install the default routes as the lowest priority.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end
